package com.example.admin.entity;

import java.io.Serializable;
import java.util.Date;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

/**
 * <p>
 * 资源权限信息表
 * </p>
 *
 * @author wangkai
 * @since 2019-06-04
 */
@TableName("tbl_sys_permission")
public class SysPermission extends Model<SysPermission> {

    /**
     *
     */
    private static final long serialVersionUID = -3596682179097800659L;

    /**
     * 资源ID
     */
    @TableId(value = "ID", type = IdType.AUTO)
    private Integer id;

    /**
     * 图标样式
     */
    @TableField("ICON")
    private String icon;

    /**
     * 父id
     */
    @TableField("PARENT_ID")
    private Integer parentId;

    /**
     * 类型
     */
    @TableField("TYPE")
    private Integer type;

    /**
     * 资源名称
     */
    @TableField("NAME")
    private String name;

    /**
     * 权限字符串
     */
    @TableField("PERMISSION")
    private String permission;

    @TableField("URL")
    private String url;

    @TableField("COMPONENT")
    private String component;

    @TableField("is_frame")
    private Integer isFrame;

    /**
     * 排序号
     */
    @TableField("ORDER_NUM")
    private Integer orderNum;

    /**
     * 是否可用，1为可用，0为不可用
     */
    @TableField("FLAG")
    private Integer flag;

    /**
     * 权限描述
     */
    @TableField("REMARK")
    private String remark;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField("CREATE_DATE")
    private Date createDate;

    @TableField("CREATE_USER_ID")
    private Integer createUserId;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPermission() {
        return permission;
    }

    public void setPermission(String permission) {
        this.permission = permission;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Integer getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Integer createUserId) {
        this.createUserId = createUserId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    public Integer getIsFrame() {
        return isFrame;
    }

    public void setIsFrame(Integer isFrame) {
        this.isFrame = isFrame;
    }

    @Override
    public String toString() {
        return "SysPermission [id=" + id + ", icon=" + icon + ", parentId=" + parentId + ", type=" + type + ", name="
                + name + ", permission=" + permission + ", url=" + url + ", orderNum=" + orderNum + ", flag=" + flag
                + ", remark=" + remark + ", createDate=" + createDate + ", createUserId=" + createUserId + "]";
    }

}
